Explore occurrence data for California oil spills in 2008 through the interactive map below.
# Read in the data:
oilspill <- read_sf(here("oil_spill_data"),
layer = "Oil_Spill_Incident_Tracking_%5Bds394%5D") %>%
clean_names() %>%
mutate(date = as.Date(dateofinci)) %>%
mutate(date = ymd(date)) %>%
rename(name = localecoun) %>%
select(name, date, inlandmari)
counties <- read_sf(here("ca_counties"),
layer = "CA_Counties_TIGER2016") %>%
clean_names() %>%
select(name)
tmap_mode("view")
tm_shape(counties)+
tm_polygons(alpha = 0.4)+
tm_shape(oilspill)+
tm_dots(col = "red", scale = .8, alpha = 0.6)+
tm_basemap("Esri.WorldTopoMap")